#include "protoserv/compiler/rpc_plugin.h"

#include <iostream>
#include <string>

int main(int argc, char* argv[]) {
  if (argc != 2) {
    std::cerr
        << "Usage: method_hash \"mypackage.MyService.MyMethod\""
        << std::endl;
    return 1;
  }
  const std::string method_name(argv[1]);
  const int hash = protoserv::compiler::ComputeMethodId(method_name);
  std::cout << hash << std::endl;
  return 0;
}
